package com.kxf.androidtestdemo.kotlin

/**
 *
 * @ProjectName:    AndroidTestDemo
 * @Package:        com.kxf.androidtestdemo.kotlin
 * @ClassName:      Test1
 * @Description:     java类作用描述
 * @Author:         kuangxuefeng
 * @qq:             1024883177
 * @CreateDate:     2020/11/18 14:16
 */
class Test1 {

}

/** 我是main入口函数 **/
fun main(args: Array<String>) {

    for (i in 10 downTo 1){
        println("$i")
    }

    var s: String = "2222哈哈哈"

    if (s!!.length > 0) {
        for (i in s.length-1 downTo 0) {
            val c: Char = s.get(i)
            //判断是否是中文
            if (c.toInt() >= 0x4e00 && c.toInt() <= 0X9fff) {
                println("$c")
            }
        }
    }
}